﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Cspl.AnimalFight.Lib.Interface;
using Cspl.AnimalFight.Lib.EventHandlers;

namespace Cspl.AnimalFight.Lib.Data
{
    class Horse : AnimalBase, IDefense
    {
        public event DefendEventHandler DefentEvent;

        public bool IsDefending
        {
            get;
            set;
        }

        public void Defend()
        {
            if (DefentEvent != null)
            {
                DefentEvent(this, new DefenseEventHandler
                {
                    AnimalName = this.AnimalName,
                    Target = Animals.Horse
                });
            }
        }

        public override void Escape()
        {
            Console.WriteLine("Horse has escaped.");
        }
    }
}
